<template>
	<view>
		<u-empty v-if="list.length == 0" mode="history">
		</u-empty>
		<card v-else v-for="(item, index) in list" :key="item.id" :item='item'></card>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list: [],
			}
		},
		onShow() {
			this.getHistoryData()
		},
		methods: {
			// 获取历史数据
			getHistoryData() {
				this.list = uni.getStorageSync("historyArr") || []
			}
		}
	}
</script>

<style>

</style>